/* 🌿 自然生态主题 - Nature Eco Theme */

/* 全局变量 */
:root {
    --primary-color: #2d5a27;
    --secondary-color: #4a7c59;
    --accent-color: #8fbc8f;
    --success-color: #228b22;
    --warning-color: #daa520;
    --error-color: #8b4513;
    --text-color: #2f4f2f;
    --text-light: #556b2f;
    --background: linear-gradient(135deg, #f0f8e8 0%, #e8f5e8 100%);
    --background-light: rgba(255, 255, 255, 0.9);
    --border-color: #90ee90;
    --shadow-sm: 0 4px 15px rgba(45, 90, 39, 0.1);
    --shadow-md: 0 8px 25px rgba(45, 90, 39, 0.15);
    --shadow-lg: 0 15px 35px rgba(45, 90, 39, 0.2);
    --border-radius: 25px;
    --transition: all 0.4s ease;
}

/* 全局背景 - 森林渐变 */
body {
    background: var(--background);
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(143, 188, 143, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(34, 139, 34, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(45, 90, 39, 0.05) 0%, transparent 50%);
    min-height: 100vh;
}

/* 卡片样式 - 叶子形状 */
.spider-card {
    background: var(--background-light);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(5px);
}

.spider-card::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    border-radius: 50% 0 50% 0;
    opacity: 0.2;
    animation: leafFloat 6s ease-in-out infinite;
}

@keyframes leafFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.spider-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
    border-color: var(--success-color);
}

.spider-card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.spider-card-header::before {
    content: '🌱';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5em;
    opacity: 0.7;
    animation: plantGrow 2s ease-in-out infinite;
}

@keyframes plantGrow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 统计卡片 - 生态数据 */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius);
    padding: 35px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M10,50 Q30,20 50,50 T90,50" stroke="rgba(255,255,255,0.1)" stroke-width="2" fill="none"/></svg>');
    background-size: 200% 100%;
    animation: vineGrow 4s linear infinite;
}

@keyframes vineGrow {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.stats-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.stats-card .stats-number {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stats-card .stats-label {
    font-size: 1.2em;
    opacity: 0.9;
    font-weight: 300;
}

/* 按钮样式 - 生态按钮 */
.btn-nature {
    background: linear-gradient(135deg, var(--success-color), var(--primary-color));
    color: white;
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn-nature::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-nature:hover::before {
    left: 100%;
}

.btn-nature:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-nature:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* 表格样式 - 有机表格 */
.spider-table {
    background: var(--background-light);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.spider-table th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
    text-align: left;
}

.spider-table td {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(144, 238, 144, 0.3);
    color: var(--text-color);
}

.spider-table tr:nth-child(even) {
    background: rgba(143, 188, 143, 0.05);
}

.spider-table tr:hover {
    background: rgba(143, 188, 143, 0.1);
    transform: translateX(5px);
    transition: var(--transition);
}

/* 图表容器 - 有机形状 */
.chart-container {
    background: var(--background-light);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    position: relative;
}

.chart-container::before {
    content: '📊';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5em;
    opacity: 0.5;
}

/* 响应式网格 - 有机布局 */
.spider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .spider-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stats-card {
        padding: 25px;
    }
    
    .stats-card .stats-number {
        font-size: 2.5em;
    }
    
    .btn-nature {
        padding: 12px 25px;
    }
}

/* 滚动条 - 自然风格 */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--success-color));
}